let weatherIcon = [
    {
        id: 300,
        path: "/static/journal/weather/cloud.png",
    },
    {
        id: 301,
        path: "/static/journal/weather/night.png",
    },
    {
        id: 302,
        path: "/static/journal/weather/rain.png",
    },
    {
        id: 303,
        path: "/static/journal/weather/rain_2.png",
    },
    {
        id: 304,
        path: "/static/journal/weather/rainbow.png",
    },
    {
        id: 305,
        path: "/static/journal/weather/snow.png",
    },
    {
        id: 306,
        path: "/static/journal/weather/sunny.png",
    },
    {
        id: 307,
        path: "/static/journal/weather/wind.png",
    },
];

let happenIcon = [
    {
        id: 200,
        path: "/static/journal/happen/diet.png",
    },
    {
        id: 201,
        path: "/static/journal/happen/game.png",
    },
    {
        id: 202,
        path: "/static/journal/happen/run.png",
    },
    {
        id: 203,
        path: "/static/journal/happen/salad.png",
    },
    {
        id: 204,
        path: "/static/journal/happen/shop.png",
    },
    {
        id: 205,
        path: "/static/journal/happen/text.png",
    },
    {
        id: 206,
        path: "/static/journal/happen/tv.png",
    },
    {
        id: 207,
        path: "/static/journal/happen/work.png",
    }
]

let moodIcon = [
    {
        id: 100,
        path: "/static/journal/mood/amazed_2.png",
    },
    {
        id: 101,
        path: "/static/journal/mood/amazed.png",
    },
    {
        id: 102,
        path: "/static/journal/mood/anger.png",
    },
    {
        id: 103,
        path: "/static/journal/mood/cry.png",
    },
    {
        id: 104,
        path: "/static/journal/mood/cute.png",
    },
    {
        id: 105,
        path: "/static/journal/mood/full.png",
    },
    {
        id: 106,
        path: "/static/journal/mood/happy.png",
    },
    {
        id: 107,
        path: "/static/journal/mood/kerchief.png",
    },
    {
        id: 108,
        path: "/static/journal/mood/kind.png",
    },
    {
        id: 109,
        path: "/static/journal/mood/laugh.png",
    },
    {
        id: 110,
        path: "/static/journal/mood/like.png",
    },
    {
        id: 111,
        path: "/static/journal/mood/love.png",
    },
    {
        id: 112,
        path: "/static/journal/mood/none.png",
    },
    {
        id: 113,
        path: "/static/journal/mood/shut.png",
    },
    {
        id: 114,
        path: "/static/journal/mood/sleepy.png",
    },
    {
        id: 115,
        path: "/static/journal/mood/sungl.png",
    },
    {
        id: 116,
        path: "/static/journal/mood/sweat.png",
    },
    {
        id: 117,
        path: "/static/journal/mood/tongue.png",
    },
    {
        id: 118,
        path: "/static/journal/mood/tooth.png",
    },
    {
        id: 119,
        path: "/static/journal/mood/zhuangkeai.png",
    }
]




// let iconMap = new Map();

// arr.forEach((item) => {
//     iconMap.set(item, item);
// });
// console.log(iconMap);
// console.log(iconMap.get(arr[0]).weather_path);



const idConvertPath = (data) => {
    data.forEach((item) => {
        switch (item.weather) {
            case 300:
                item.weather_path = "/static/journal/weather/cloud.png";
                break;
            case 301:
                item.weather_path = "/static/journal/weather/night.png";
                break;
            case 302:
                item.weather_path = "/static/journal/weather/rain.png";
                break;
            case 303:
                item.weather_path = "/static/journal/weather/rain_2.png";
                break;
            case 304:
                item.weather_path = "/static/journal/weather/rainbow.png";
                break;
            case 305:
                item.weather_path = "/static/journal/weather/snow.png";
                break;
            case 306:
                item.weather_path = "/static/journal/weather/sunny.png";
                break;
            case 307:
                item.weather_path = "/static/journal/weather/wind.png";
                break;
        }
        switch (item.happen) {
            case 200:
                item.happen_path = "/static/journal/happen/diet.png";
                break;
            case 201:
                item.happen_path = "/static/journal/happen/game.png";
                break;
            case 202:
                item.happen_path = "/static/journal/happen/run.png";
                break;
            case 203:
                item.happen_path = "/static/journal/happen/salad.png";
                break;
            case 204:
                item.happen_path = "/static/journal/happen/shop.png";
                break;
            case 205:
                item.happen_path = "/static/journal/happen/text.png";
                break;
            case 206:
                item.happen_path = "/static/journal/happen/tv.png";
                break;
            case 207:
                item.happen_path = "/static/journal/happen/work.png";
                break;
        }
        switch (item.mood) {
            case 100:
                item.mood_path = "/static/journal/mood/amazed_2.png";
                break;
            case 101:
                item.mood_path = "/static/journal/mood/amazed.png";
                break;
            case 102:
                item.mood_path = "/static/journal/mood/anger.png";
                break;
            case 103:
                item.mood_path = "/static/journal/mood/cry.png";
                break;
            case 104:
                item.mood_path = "/static/journal/mood/cute.png";
                break;
            case 105:
                item.mood_path = "/static/journal/mood/full.png";
                break;
            case 106:
                item.mood_path = "/static/journal/mood/happy.png";
                break;
            case 107:
                item.mood_path = "/static/journal/mood/kerchief.png";
                break;
            case 108:
                item.mood_path = "/static/journal/mood/kind.png";
                break;
            case 109:
                item.mood_path = "/static/journal/mood/laugh.png";
                break;
            case 110:
                item.mood_path = "/static/journal/mood/like.png";
                break;
            case 111:
                item.mood_path = "/static/journal/mood/love.png";
                break;
            case 112:
                item.mood_path = "/static/journal/mood/none.png";
                break;
            case 113:
                item.mood_path = "/static/journal/mood/shut.png";
                break;
            case 114:
                item.mood_path = "/static/journal/mood/sleepy.png";
                break;
            case 115:
                item.mood_path = "/static/journal/mood/sungl.png";
                break;
            case 116:
                item.mood_path = "/static/journal/mood/sweat.png";
                break;
            case 117:
                item.mood_path = "/static/journal/mood/tongue.png";
                break;
            case 118:
                item.mood_path = "/static/journal/mood/tooth.png";
                break;
            case 119:
                item.mood_path = "/static/journal/mood/zhuangkeai.png";
                break;
        }
    });
    return data
};

export {
    idConvertPath,
    weatherIcon,
    moodIcon,
    happenIcon
}
